import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  //配置服务器信息
  server: {
    //配置端口
    port: 6060,
    //配置网络请求代理 - 解决axios跨域请求
    proxy: {
      "/home": {
        target: "http://localhost:9090",
        changeOrigin: true,
      },
    },
  },
  //配置模块解析行为
  resolve: {
    //配置别名
    alias: {
      "@": path.resolve(__dirname, "./src"),
    },
  },
});
